//
//  UIImageView+MM_Request.h
//  MallManage_IOS
//
//  Created by 张浩 on 2023/12/18.
//

#import <UIKit/UIKit.h>
#import <SDWebImage/SDWebImage.h>

NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    originalImage,  //原图
    heiQulityImage, //640
    biggerImage,    //240
    middleImage,    //140
    smallImgage,    //50
} imageType;

@interface UIImageView (MM_Request)

/**
 *  网络请求不带服务器地址的图片
 *
 *  @param url         地址url
 *  @param placeholder 展位图
 */
- (void)MM_setImageWithUrl:(NSString *)url
          placeholderImage:(UIImage *)placeholder;
/**
 *  网络请求不同大小的图片
 *
 *  @param url         地址url
 *  @param placeholder 展位图
 *  @param type        type description
 */
- (void)MM_setImageWithUrl:(NSString *)url
          placeholderImage:(UIImage *)placeholder
                      Type:(imageType)type;

/**
 *  网络请求不同大小的图片
 *
 *  @param url             地址url
 *  @param placeholder     展位图
 *  @param completedBlock  completedBlock完成回调
 */
- (void)MM_setImageWithUrl:(NSString *)url
          placeholderImage:(UIImage *)placeholder
                      Type:(imageType)type
                 completed:(SDExternalCompletionBlock)completedBlock;


@end

NS_ASSUME_NONNULL_END
